package homework01;
import java.util.Scanner;
public class homewo2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入存款金额：");
        int price = scan.nextInt();
        System.out.println("请输入存款年限：");
        int year = scan.nextInt();
        double total = 0;
        if (year == 1) {
            total = price + (price * 0.0225 * year);
        } else if (year == 2) {
            total = price + (price * 0.027 * year);
        }else if (year == 3) {
            total = price + (price * 0.0325 * year);
        }else if (year == 5) {
            total = price + (price * 0.036 * year);
        }
        System.out.println("存款"+year+"年后的本息是："+total);
    }
}
